package qlsl.androiddesign.adapter.subadapter;

import java.util.List;

import com.qlsl.androiddesign.kuaiwa.R;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import qlsl.androiddesign.activity.baseactivity.BaseActivity;
import qlsl.androiddesign.adapter.baseadapter.BaseAdapter;
import qlsl.androiddesign.entity.otherentity.ThreeCategory;
import qlsl.androiddesign.util.commonutil.ImageUtils;
import qlsl.androiddesign.util.commonutil.Log;

public class CategoryListAdapter extends BaseAdapter<ThreeCategory.RowsBean> {

	public CategoryListAdapter(BaseActivity activity,
			List<ThreeCategory.RowsBean> list) {
		super(activity, list);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = getItemView(convertView,
				R.layout.listitem_shopping_category);

		TextView tv_text = getView(convertView,
				R.id.vehicle_fragment_item_title);
		ImageView iv_icon = getView(convertView, R.id.vehicle_fragment_item_img);

		ThreeCategory.RowsBean item = getItem(position);
		ImageUtils.rect(activity, item.getPhoto(), iv_icon);
		tv_text.setText(item.getSumciertype());

		return convertView;
	}
}
